package com.sptpc.qimoxiangmu.model.vo;

import com.fasterxml.jackson.databind.annotation.JsonDeserialize;
import com.sptpc.qimoxiangmu.util.MoneyDeserializer;
import com.sun.istack.NotNull;
import lombok.AllArgsConstructor;
import lombok.Data;
import org.joda.money.Money;

import javax.validation.constraints.NotEmpty;

@Data
@AllArgsConstructor
public class ModelVo {
    @NotNull
    private Long id;
    @NotEmpty
    private String model;
    @NotNull//对参数不为空进行检验，若为空则显示检验有问题
    private long typeId;
    @JsonDeserialize(using = MoneyDeserializer.class)
    @NotNull
    private Money price;
}
